package cn.tedu.springdemo.day08;

import org.springframework.context.annotation.Lazy;
import org.springframework.context.annotation.Scope;
import org.springframework.stereotype.Component;

/**
 * 单例模式和多例模式
 */
@Component("p")
//@Scope("prototype")//指定Person类是多例模式
@Lazy
public class Person {
    public Person(){
        System.out.println("person对象...."+this);
    }
}
